package com.example.demo.model;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author Liunh
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class ImportExcelDto<T> {

    @ApiModelProperty(name = "timestamp", value = "数据列表")
    private List<T> dataList;

    @ApiModelProperty(name = "dataType", value = "数据类型", example = "1")
    private Integer dataType;

    @ApiModelProperty(name = "timestamp", value = "数据类型描述", example = "数据类型描述")
    private String dataTypeDesc;

    @ApiModelProperty(name = "timestamp", value = "时间戳", example = "1")
    private long timestamp = System.currentTimeMillis();

    public ImportExcelDto(List<T> dataList) {
        this.dataList = dataList;
    }

    public ImportExcelDto(List<T> dataList, Integer dataType) {
        this.dataList = dataList;
        this.dataType = dataType;
    }

    public ImportExcelDto(List<T> dataList, Integer dataType, String dataTypeDesc) {
        this.dataList = dataList;
        this.dataType = dataType;
        this.dataTypeDesc = dataTypeDesc;
    }

}
